# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: Adrián Chaves Fernández (aka Gallaecio) <adriyetichaves@gmail.com>
# Contributor: Todd Partridge (aka Gen2ly) <toddrpartridge@gmail.com>

pkgname=zaz
pkgver=1.0.1
pkgrel=1
pkgdesc="Puzzle game where the player has to arrange balls in triplets"
arch=('loong64' 'x86_64')
url="http://sourceforge.net/projects/zaz/"
license=('GPL3' 'custom:CCBYSA')
depends=('ftgl' 'sdl' 'sdl_image' 'libvorbis' 'libtheora')
source=("https://download.sourceforge.net/sourceforge/zaz/files/$pkgname-$pkgver.tar.gz")
sha512sums=('23ec04acaf0e75d7b99a4b58992d77d8d2074db1a2712c58a2c2a719682ed5aef508d5ffb15ff8c9a1a5ced119342654b6e599300b36e82488865dd851acf3da')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --disable-splash
  make ZAZ_LIBS+=" -lvorbis -logg -lSDL -lvorbisfile -ltheora -ltheoradec -ltheoraenc"
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install

  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  install -Dm644 data/copyright.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE_DATA
}
